<!--  start table ..................................................................................... -->
{if $control->getDataSource()->count() > 0}
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
    <tr>
        <th class="table-header-repeat line-left" n:foreach="$control['columns']->getComponents() as $column">
            <a n:if="$column->getSorting() === null" n:href="sort!, $column->getName(), asc" n:class="$control->getAjaxClass()">{$column->getTitle()} <span class="ui-icon ui-icon-carat-2-n-s"></span></a>
            <a n:if="$column->sorting === 'asc'" n:href="sort!, $column->getName(), desc" n:class="$control->getAjaxClass()">{$column->getTitle()} <span class="ui-icon ui-icon-triangle-1-n"></span></a>
            <a n:if="$column->sorting === 'desc'" n:href="sort!, null, null" n:class="$control->getAjaxClass()">{$column->getTitle()} <span class="ui-icon ui-icon-triangle-1-s"></span></a>
            
        </th>
    </tr>
    {foreach $control->getDataSource() as $item}
    <tr{if $iterator->isEven()} class="alternate-row"{/if} n:class="$control->getRowClass($iterator, $item)">
        <td n:class="gridito-cell, $column->getCellClass($iterator, item), $control->getHighlightOrderedColumn() && $column->getSorting() ? ui-state-highlight" n:foreach="$control['columns']->getComponents() as $column">
            {control $column:cell $item}
        </td>
        <td class="gridito-actioncell" n:if="$control->hasActions()" n:inner-foreach="$control['actions']->getComponents() as $button">
            {control $button $item}
        </td>
    </tr>
    {/foreach}
</table>
{/if}
<!--  end table................................... --> 
<!--  start paging..................................................... -->
{var $paginator = $control->getPaginator()}
<table border="0" cellpadding="0" cellspacing="0" id="paging-table">
    <tr>
        <td>
            <a n:href="changePage! page => 1" n:if="!$paginator->isFirst()" class="ajax page-far-left"></a>
            <a n:href="changePage! page => $paginator->page - 1" n:if="!$paginator->isFirst()" class="ajax page-left"></a>

            <div id="page-info">Stránka <strong>{=$paginator->page}</strong> / {=$paginator->pageCount}</div>
		<a n:href="changePage! page => $paginator->page + 1" n:if="!$paginator->isLast()" class="page-right"></a>
		<a n:href="changePage! page => $paginator->pageCount" n:if="!$paginator->isLast()" class="page-far-right"></a>
        </td>
    </tr>
</table>

<!--  end paging................ -->
